
var { getLoginedUser, 

fnLoading, fnHideLoading, fnSuccess, fnFail } = require('../../utils/index')
import { domainStatic } from '../../utils/env.js';
import _ from '../../utils/underscore.js';
import { get, fnChoose, lsGetStr,
lsGetObj,
 lsSetStr, fnUpload, post } from '../../utils/request.js';
Page({
  onShareAppMessage: function () {
    let that = this;
   
    console.log(lsGetObj('loginedUser').id);

    return {
      title: '闻权我们做软著不收费，政府项目免费给您先报。', // 转发后 所显示的title
      path: '/pages/home2/index?partnerId=' + lsGetObj('loginedUser').id,// 相对的路径
      imageUrl: '/image/img/share.png',
      success: (res) => {    // 成功后要做的事情
        wx.getShareInfo({
          shareTicket: res.shareTickets[0],
          success: (res) => {
            that.setData({
              isShow: true
            })
          },
          fail: function (res) { console.log(res) },
          complete: function (res) { console.log(res) }
        })
      },
      fail: function (res) {
        // 分享失败
        console.log(res)
      }
    }
  },
  onLoad: function (options) {
    let number = lsGetObj('loginedUser').id||103
    console.log(number);
    this.setData({
      number: number
    })
  }

})